﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SQL_Manager
{
    class Settings
    {
        private static SQL_Manager.Properties.Settings _s = new SQL_Manager.Properties.Settings();

        #region Connection settings
        public static string Username
        {
            get
            {
                return _s.Username;
            }
            set
            {
                _s.Username = value;
            }
        }

        public static string Database
        {
            get
            {
                return _s.Database;
            }
            set
            {
                _s.Database = value;
            }
        }

        public static string Host
        {
            get
            {
                return _s.Host;
            }
            set
            {
                _s.Host = value;
            }
        }
        #endregion 

        #region Settings functions
        //Settings related functions here
        public static void Save()
        {
            _s.Save();
        }

        public static void CharToString(char[] chars, System.Windows.Forms.TextBox Output)
        {
            if (chars != null)
            {
                Output.Text = "";

                foreach (char c in chars)
                {
                    Output.Text += char.ToString(c);
                }
            }
        }
        #endregion
    }
}
